From: Jonas Ã…dahl Date: Thu, 26 Oct 2017 09:15:46 +0000 (+0200) Subject: st-shadow: Ceil size before comparing with texture X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~888^2^2~71 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=5d4a804c90ef824f7edc76d460cd4dd495b5df15;p=gnome-shell.git st-shadow: Ceil size before comparing with texture A fractional resource scale would mean we never use the fast path for creating the shadow, because we'd cast the int to a float before comparing, which would never match. Instead compare the expected texture size with the source texture, to actually potentially trigger the fast path. https://bugzilla.gnome.org/show_bug.cgi?id=765011 --- diff --git a/src/st/st-private.c b/src/st/st-private.c index c9bcf4c3a..688b17b78 100644 --- a/src/st/st-private.c +++ b/src/st/st-private.c @@ -444,8 +444,8 @@ _st_create_shadow_pipeline_from_actor (StShadow *shadow_spec, if (!clutter_actor_get_resource_scale (actor, &resource_scale)) return NULL; - width *= resource_scale; - height *= resource_scale; + width = ceilf (width * resource_scale); + height = ceilf (height * resource_scale); image = clutter_actor_get_content (actor); if (image && CLUTTER_IS_IMAGE (image))